#Found (and modified) here: http://www.pythonware.com/library/tkinter/introduction/dialog-windows.htm

import tkSimpleDialog
from Tkinter import Label, Entry
from dateutil.parser import parse

class WorkoutDialog(tkSimpleDialog.Dialog):

    def body(self, master):

        Label(master, text="Name:").grid(row=0)
        Label(master, text="Date:").grid(row=1)
        Label(master, text="Description").grid(row=2)

        self.e1 = Entry(master)
        self.e2 = Entry(master)
        self.e3 = Entry(master)

        self.e1.grid(row=0, column=1)
        self.e2.grid(row=1, column=1)
        self.e3.grid(row=2, column=1)
        return self.e1 # initial focus

    def apply(self):
        self.name = self.e1.get()
        self.date = parse(self.e2.get())
        self.description = self.e3.get()
    
